package com.hxx.controller;

import com.hxx.ai.AiAssiatant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MemoryController {

    @Autowired
    private AiAssiatant aiAssiatant;


    @GetMapping("/memory")
    public String memory(String prompt){
        String result = aiAssiatant.chat(prompt);
        return result;
    }

    @GetMapping("/memory1")
    public String memory1(String mid,String prompt){
        String result = aiAssiatant.chat(mid,prompt);
        return result;
    }
}





















